﻿using CC_day_14___Shapes_MVC.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace CC_day_14___Shapes_MVC.Controllers
{
    public class HomeController : Controller
    {
        Circle c = new Circle()
        {
            Name = "Circle",
            Radius = 10
        };

        Triangle t = new Triangle()
        {
            Name = "Triangle",
            Base = 10,
            Height = 10
        };

        Rectangle r = new Rectangle()
        {
            Name = "Rectangle",
            Length = 10,
            Width = 10
        };

        public ActionResult About()
        {
            return View(c);
        }

        public ActionResult Contact()
        {
            return View(t);
        }

        public ActionResult Foo()
        {
            return View(r);
        }

        public ActionResult Index()
        {
            List<Shape> shapes = new List<Shape>() { c, t, r };
            return View(shapes);
        }
    }
}